home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Programming / SWI / source / README.windows < prev    next >
Encoding:
Text File  |  1994-11-30  |  10.4 KB  |  295 lines

  1.             SWI-Prolog for Windows
  2.                 Jan Wielemaker
  3.                    06/06/94
  4.  
  5.               (Updated: 16/11/94)
  6.                 (Version 1.9.4)
  7.  
  8.  
  9. This distribution contains SWI-Prolog for  Windows.    It  is  a port of
  10. version 1.9.4 of SWI-Prolog.  SWI-Prolog  runs   in  a  simple MS-Window
  11. providing traditional stream-based interaction.
  12.  
  13.  
  14. Status:
  15. =======
  16.  
  17. Third beta test  version.   First   beta-test  version  reported  mostly
  18. installation problems due to filename   representation  problems.  Third
  19. beta-test version should run on machines lacking floating point hardware
  20. (`SX' machines).  It should fix a bug in the stack-expander incorporates
  21. various improvements and fixes in  the   common  sources.  Please report
  22. problems to jan@swi.psy.uva.nl.
  23.  
  24.  
  25. Version 1.9.4 windows-specific changes
  26. ======================================
  27.  
  28.     * Compiled for floating-point emulations on machines that
  29.       lack floating point hardware.
  30.     * Fixed memory management bug in stack-expander.
  31.     * Added DDE interface.
  32.     * Added editor declaration for Windows notepad.
  33.     * Fixed problem in file-name mapping that caused existing
  34.       files to be reported as non-existing sometimes.
  35.  
  36. Version 1.9.0 windows-specific changes
  37. ======================================
  38.  
  39.     * Filename conversion and finding the home-directory is
  40.       fixed.
  41.     * The drive's root directory is now handled properly.
  42.     * Fatal errors will now often :-( show a Windows message-box
  43.       instead of just quiting Prolog.  This allows you to read
  44.       the message :-)
  45.     * Control-C break is tested in the main virtual machine loop.
  46.       A few procent slower, but it does allow you to break a
  47.       looping program ...
  48.     * Cut-and-paste is implemented in the console-window, allowing
  49.       for xterm-like cut-and-paste (left/right to start/extend the
  50.       selection and middle to paste it).
  51.     * Improved error reporting.
  52.     * Now Writes files in DOS text-format rather then using binary
  53.       mode.
  54.     * Installation has changed a bit.  Read it!
  55.       ============
  56.  
  57.  
  58. Copyright:
  59. ==========
  60.  
  61. SWI-Prolog may be  distributed  freely   for  non-commercial  use.   See
  62. pl\licence for a more complete description of your rights.
  63.  
  64.  
  65. Requirements:
  66. =============
  67.  
  68. 386/486/pentium based PC running MS-Windows 3.1.  SWI-Prolog is compiled
  69. using the WATCOM 32-bit C/C++ compiler and   should run on machines with
  70. and with or without floating point   coprocessor.   Minimum memory usage
  71. will be about 1  MB.   You'll  probably  need   at  least  4  MB  to run
  72. SWI-Prolog under Windows.  Please report your experiences.
  73.  
  74.  
  75. Parts:
  76. ======
  77.  
  78. The system consists of four parts:
  79.  
  80.     bin/pl.exe    32-bits Windows Executable.
  81.  
  82.     bin/pl.qlf    Quick-Load-File containing procompiled Prolog
  83.             code, defining various essential parts of the
  84.             Prolog system.
  85.  
  86.             Should be installed in the same directory as
  87.             pl.exe and have the same base-name.
  88.     
  89.             Other places where it will be looking for this
  90.             file are: startup/startup.pc and startup/startup
  91.             (both relative to the `home' directory).
  92.  
  93.     library\    The Prolog library file.  Holds the Prolog
  94.             library and help system.
  95.  
  96.     boot\        Contains the Prolog source for building pl.qlf.
  97.             You don't need this if you don't want to look
  98.             at this or modify it.
  99.  
  100.  
  101. Installation:
  102. =============
  103.  
  104. Unpack the zip file from C:, creating a directory c:\pl.  If you want to
  105. install in another directory, there are   various  possibilities to make
  106. the system find its home directory.  It will be looking for these in the
  107. following places (in this order:
  108.  
  109.     1) Trying the environment variable `SWI_HOME_DIR'
  110.     2) Trying the environment variable `SWIPL'
  111.     3) Trying the parent directory of the directory from
  112.        which the executable was loaded.  Thus, if pl.exe
  113.        is in bin/pl.exe from the home directory this should
  114.        work.
  115.     4) Trying <drive>:\pl where drive is one of `cdefghijklmnopab'
  116.  
  117. 3) is the new and  preferred  way   of  finding  the home directory.  It
  118. implies that you just have to make  a new `program instance', specifying
  119. an absolute path to the pl.exe executable.
  120.  
  121. Create a `New Program Object' using the Window Program Manager's `new...'
  122. option.  The fields should be:
  123.  
  124.     Description:        SWI-Prolog
  125.     Command Line:        c:\pl\bin\pl.exe
  126.     Working Directory:    The place you work
  127.  
  128. Modify `Command Line' if you installed SWI-Prolog into another directory.
  129.  
  130.  
  131. Configuration of the Console:
  132. =============================
  133.  
  134. The stream-based console window is a  completely separate library, using
  135. its own configuration info.  It will  look at two environment variables:
  136. "CONSOLE" and the base-name of the running  program ("PL" if you use the
  137. default configuration).  Options in "PL"   overrule  those in "CONSOLE".
  138. Options in "CONSOLE" apply to any application compiled using the console
  139. library.  The options variable should contain a string of the form
  140.  
  141.     <name>:<value>{,<name>:<value>}
  142.  
  143. Where <name> is one of:
  144.  
  145.     <name>    default        description
  146.     sl    200        Number of lines you can scroll back.
  147.                 There is no limit, but the more you
  148.                 specify the more memory will be used.
  149.                 Memory is allocated when data becomes
  150.                 available.
  151.     rows    24        Initial number of lines
  152.     cols    80        Initial number of columns
  153.     x    CW_USEDEFAULT    X-coordinate of the top-left corner.
  154.     y    CW_USEDEFAULT    Y-coordinate of the top-left corner.
  155.                 
  156. You will normally specify this in your autoexec.bat file.  Here is
  157. what I use:
  158.  
  159.     set CONSOLE=sl:600,x:400,y:400
  160.  
  161. Editor interface
  162. ================
  163.  
  164. SWI-Prolog defines an interface to  an   external  text editor using the
  165. predicates ed(+Predicate) and edit(+File).   Normally,   after  the user
  166. quits the editor, the system will run  the predicate make/0 to recompile
  167. all modified files.  This will not work  for Windows as the shell/1 call
  168. returns immediately, without waiting  for   the  external application to
  169. finish.
  170.  
  171. You can specify the editor in autoexec.bat   or ~/_plrc.  If you wish to
  172. use the simple notepad editor delivered  with Windows, put the following
  173. line in your ~/_plrc:
  174.  
  175.     ?- setenv('EDITOR', notepad).
  176.  
  177.  
  178. Windowing and Graphics
  179. ======================
  180.  
  181. SWI-Prolog itself has  no  graphical   capabilities.   Graphics  can  be
  182. provided by the XPCE toolkit, for which   an  MS-Windows beta version is
  183. available.  XPCE is *not* free software.  It is distributed for academic
  184. users  at  a  price  of  dfl.   500,--  (at  the  time  of  writing,  $1
  185. approximates dfl.  1.75).  This licence   includes classroom and student
  186. usage.  For details, ftp swi.psy.uva.nl/pub/xpce/Windows/...  or contact
  187. xpce-request@swi.psy.uva.nl if you are interrested.
  188.  
  189.  
  190. Filenames:
  191. ==========
  192.  
  193. All filenames are internally handled in   a Unix compatible format: they
  194. are lowercase, the directories are  separated   with  a '/' and absolute
  195. files are of the form  /<drive>:/...    Filenames  will  be converted to
  196. DOS/Windows format just before invoking the C-library functions.
  197.  
  198. Filename expansion will translate `~' to  the environment variable HOME.
  199. Constructs  of  the  form  $VAR  in    filenames  are  expanded  to  the
  200. corresponding environment variable.  DOS %VAR% is not recognised.
  201.  
  202. The user may specify filenames either using   DOS format or Unix format.
  203. Unix format should be used in source-files that   need to be run both on
  204. the Unix and DOS/Windows version.
  205.  
  206. The predicate prolog_to_os_filename(+PrologPath, +OsPath) may be used to
  207. explicitely  convert  filenames  between   both  representations.   This
  208. predicate exists in all versions of 1.9.4  and later.  On unix it simply
  209. unifies the arguments.  
  210.     
  211. Features and bugs specific to this version:
  212. ===========================================
  213.  
  214.     * Dynamically expanding runtime stacks using a stack-shifter.
  215.       Expands the environment (local), heap (global) and trail-stacks
  216.       if necessary.
  217.  
  218.     * Garbage collection on global (heap) and trail-stacks.
  219.  
  220.     * Fixed C-stack of 128 KB (limits depth of unification and
  221.       various other recursive tasks; does not limit normal Prolog
  222.           recursion).
  223.  
  224.     * GNU-Readline 1.2 based input editor that allows for GNU-EMACS
  225.       like editing of the command line.  This input editor runs on
  226.       top of a simple, still incomplete I/O window.     Features:
  227.  
  228.           * Command history using ^P, ^N
  229.         * Cursor movement using ^B, ^F, etc.
  230.         * Many more; just try the GNU-Emacs bindings!
  231.         * End-of-file is ^D.
  232.         * Completion on files and atoms using TAB, viewing
  233.           alternatives using ESC-?
  234.  
  235.         * Window may be resized and scrolled.
  236.         * Cut-and-paste is similar to X11's xterm:
  237.           left-button starts a selection, right-button extends
  238.           it and middle-button pastes.
  239.  
  240.       Bugs:
  241.  
  242.         * Showing matching bracket does not work
  243.         * Resizing the window while the line is wrapped gives
  244.           bad results.
  245.  
  246.     * save/[1,2] and save_program/[1,2] do not work.
  247.  
  248.     * profile/1 does not work.
  249.  
  250.     * load_foreign/[2,5] does not work.
  251.  
  252.     * The statistics/[0.2] reported CPU-time also includes idle time.
  253.  
  254.     * help/1 just dumps it output in the console window.  Should be
  255.       a separate window some day ...
  256.  
  257.  
  258. Boot compilation:
  259. =================
  260.  
  261. The file bin/pl.qlf is a `Prolog Quick  Load File' file created from the
  262. Prolog sources in the boot subdirectory.  If you want to change anything
  263. there, you can recreate the startup file using the command:
  264.  
  265.     pl.exe -b boot/init.pl -c boot/load.pl
  266.  
  267. For this command-line the working directory should be the home directory
  268. of Prolog.  If not, you should absolute paths.
  269.  
  270.  
  271. Sources:
  272. ========
  273.  
  274. The common source for all platforms is  available using anonymous ftp to
  275. swi.psy.uva.nl,  directory  pub/SWI-Prolog.   The   Windows  version  is
  276. compiled using the 32-bit WATCOM C/C++   compiler (version 9.5).  If you
  277. decide to port it to another compiler  (for example GCC), please forward
  278. me the changes.
  279.  
  280. SWI-Prolog is reported *not* to compile  using WATCOM version 10.0.  The
  281. problem appears that there is no   specific area in virtual memory-space
  282. where malloc() happens.  This implies there are  no (not enough) bits on
  283. a pointer to add tags to it.
  284.  
  285. It uses two libraries, both of which may be found at ftp.swi.psy.uva.nl:
  286. Library xos.lib redefines the WATCOM file  access library to handle both
  287. Unix and DOS format files and make   the direcory operations work on the
  288. root-direcories of a drive.  Library   readline.lib provides the console
  289. window and readline command-editor.  Both libraries are assumed to be
  290. installed next to the Prolog sources:
  291.  
  292.     ..../xos/...        XOS library
  293.     ..../readline/...    Readline and console library
  294.     ..../pl/...        SWI-Prolog source
  295.